//
//  LRXWinSize.m
//  路人侠
//
//  Created by zhangxulong on 2/8/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXWinSize.h"

@implementation LRXWinSize


- (instancetype)initWithScreenSize
{
    CGRect winSize = [UIScreen mainScreen].bounds;
    CGFloat winSizeWidth = winSize.size.width;
    CGFloat winSizeHeigth = winSize.size.height;
    CGFloat widthScale = winSizeWidth * 0.5 / 320;
    CGFloat heightScale = winSizeHeigth * 0.5 / 568;
    
    self.widthScale = widthScale;
    self.heightScale = heightScale;
    return self;
  
}
+ (CGFloat)initWithScreenSizeHeight
{
    LRXWinSize * p = [[LRXWinSize alloc]initWithScreenSize];
    return p.heightScale;
}

+ (CGFloat)initWithScreenSizeWidth
{
    LRXWinSize * p = [[LRXWinSize alloc]initWithScreenSize];
    return p.widthScale;
    
}
@end
